package com.ib.thread;

import com.ib.client.Client;

public class TestNettyThead implements Runnable{
	
	private Integer i = 0;

	public static void main(String[] args) throws Exception {
		for(int i=0;i<5;i++) {
			TestNettyThead thread = new TestNettyThead(i);
			new Thread(thread).start();
			Thread.sleep(1000);
		}
	}

	@Override
	public void run() {
		Thread.currentThread().setName("netty-thread-"+i);
		Client client = new Client();
		client.init();
		try {
			client.sendData("{\"machineId\":\"423423\"}");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public TestNettyThead(Integer i) {
		super();
		this.i = i;
	}
	
	
}
